import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Table';

export const columns: BasicColumn[] = [
  {
    title: '名称',
    align: 'center',
    dataIndex: 'name',
  },
  {
    title: '报表编码',
    align: 'center',
    dataIndex: 'code',
  },
  {
    title: '分组',
    align: 'center',
    dataIndex: 'reportGroup',
  },
  {
    title: '报表类型',
    align: 'center',
    dataIndex: 'reportType',
  },
  {
    title: '报表缩略图',
    align: 'center',
    dataIndex: 'reportImage',
  },
  {
    title: '报表描述',
    align: 'center',
    dataIndex: 'reportDesc',
  },
  {
    title: '版本号',
    align: 'center',
    dataIndex: 'version',
  },
];

export const searchFormSchema: FormSchema[] = [];

export const formSchema: FormSchema[] = [
  {
    field: 'id',
    label: '',
    component: 'Input',
    show: false,
  },
  {
    field: 'name',
    label: '名称',
    component: 'Input',
    required: true,
  },
  {
    field: 'code',
    label: '报表编码',
    component: 'Input',
    required: true,
  },
  {
    field: 'reportGroup',
    label: '分组',
    component: 'Input',
    required: true,
  },
  {
    field: 'reportType',
    label: '报表类型',
    component: 'ApiSelect',
    required: true,
    defaultValue: 'table_report',
    componentProps: {
      dictCode: 'report_type',
    },
  },
  {
    field: 'reportImage',
    label: '报表缩略图',
    component: 'Input',
  },
  {
    field: 'reportDesc',
    label: '报表描述',
    component: 'Input',
  },
];
